package com.zhoufy;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

import java.util.List;

/**
 * Created with IntelliJ IDEA by ChouFy on 2020-07-27.
 *
 * @author chouFy
 */
@SpringBootApplication
public class MongoDatabaseSpringBootDemo {

    public static void main(String[] args) {
        ApplicationContext run = SpringApplication.run(MongoDatabaseSpringBootDemo.class, args);
        ResumeRepository bean = run.getBean(ResumeRepository.class);


        List<Resume> all = bean.findAll();

        System.out.println(all.toString());

        List<Resume> zfy = bean.findByNameEquals("zfy");
        System.out.println(zfy.toString());

    }
}
